# wavelets makefile
# should work on windows w/ cygwin, gcc, mingw32
# *nix and osx should work also

CC = gcc
OBJ = main.o
LINKOBJ = main.o
OSXLIBS = -framework SDL -framework Cocoa #-framework AppKit -framework Foundation
BIN = wavelets
WININCS = -I\Dev-Cpp\include
WINLIBS = -lmingw32 -L\Dev-Cpp\lib
RM = rm -f

win: clean
	$(CC)  -c main.c -o main.o ${WININCS}
	$(CC) ${LINKOBJ} -o "..\build\wavelets.exe" -lSDL -lSDLmain ${WINLIBS}

osx: clean
	$(CC) -c SDLMain.m -o SDLMain.o
	$(CC) ${LINKOBJ} -o "../build/wavelets-osx" ${CFLAGS} $(OSXLIBS}

nix: clean
	$(CC)  -c main.c -o main.o
	$(CC) -lSDL -lSDLmain ${LINKOBJ} -o "../build/wavelets"

#sorry, no `make all`
#all: clean wavelets

clean:
	${RM} $(OBJ)

#$(BIN): $(OBJ)
#	$(CC) $(LINKOBJ) -o  $(LIBS)

#this is universal..
#main.o: main.c
#	$(CC) -c main.c -o main.o $(CFLAGS)

# eof
